home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / JAVA Utilities / JProxy 1.1.0 / SAMPLES.JAR / com / jproxy / samples / ejb / test / Test.java < prev   
Encoding:
Java Source  |  2003-04-29  |  656 b   |  29 lines

  1. package com.jproxy.samples.ejb.test;
  2.  
  3. import javax.ejb.*;
  4. import java.rmi.RemoteException;
  5.  
  6. import com.jproxy.samples.interfaces.ITest;
  7.  
  8. public class Test
  9.     extends Base
  10.     implements ITest
  11. {
  12.     public long getServerTime()
  13.         throws RemoteException
  14.     {
  15. //        System.out.println("TestSessionBean: CallerPrincipal:"+context.getCallerPrincipal());
  16.         long time = System.currentTimeMillis();
  17.         System.out.println(new java.util.Date(time));
  18.         return time;
  19.     }
  20.  
  21.     public byte[] echoBytes(byte[] bytes)
  22.         throws RemoteException
  23.     {
  24.         if(bytes==null)
  25.             throw new RemoteException("RemoteException test: wrong parameter: null");
  26.         return bytes;
  27.     }
  28. }
  29.